<?php $this->load->view('_inc/header_popup')?>
<script>
    $(document).ready(function(){
        $('#mostraSenha').mouseenter(function() {
            $('#isenha').attr('type','input');
        }).mouseleave(function() {
            $('#isenha').attr('type','password');
        });
        $('#itel').mask('(99)9999-9999');
        $('#ientrada').mask('9º/9999');
        $('#icpf').mask('999.999.999-99');
        $('#imat').mask('99/9999999');
    });
</script>

<h1>Edição de Aluno</h1>
<?php echo form_open('aluno/editando'); ?>
<table>
    <?php echo form_hidden('id',$aluno->id)?>
    <tr><td><?php echo form_label('Nome:','inome'); echo form_input('nome',$aluno->nome,'id="inome" autofocus class=required'); ?></td></tr>
    <tr><td><?php echo form_label('Matrícula:','imat'); echo form_input('matricula',$aluno->matricula,'id="imat" autofocus class=required'); ?></td></tr>
    <tr><td><?php echo form_label('CPF:','icpf'); echo form_input('cpf',$aluno->cpf,'id="icpf" class=required'); ?></td></tr>
    <tr><td><?php echo form_label('Curso:','icargo'); echo form_dropdown('curso',$cursos,$aluno->curso_id,'id="icargo" class=required'); ?></td></tr>
    <tr><td><?php echo form_label('E-mail:','iemail'); echo form_input('email',$aluno->email,'id="iemail" class=required'); ?></td></tr>
    <tr><td><?php echo form_label('Telefone:','itel'); echo form_input('telefone',$aluno->telefone,'id="itel"'); ?></td></tr>
    <tr><td><?php echo form_label('Semestre de Entrada:','ientrada'); echo form_input('entrada',$aluno->entrada,'id="ientrada" class=required'); ?></td></tr>
    <tr><td><?php echo form_label('Usuario:','iusuario'); echo form_input('usuario',$aluno->login,'id="iusuario" class=required'); ?></td></tr>
    <tr>
        <td style="width: auto">
            <?php echo form_label('Senha:','isenha'); echo form_password('senha','','id="isenha" style="width: 130px"'); ?>
            <a id="mostraSenha" class="icone olho"> </a>
        </td>
    </tr>
    <tr>
        <td>
            <?php echo form_submit('','Salvar') ?>
            <?php echo form_button('','Cancelar', 'class=cancela')?>
        </td>
    </tr>
</table>
<?php echo form_close(); ?>